/**      
 * @file		simpleIO.cpp
 * @description		Demonstrates reading a file.
 *			Utilizes fstream library.
 * @course		CSCI 123 Section 00000
 * @assignment 
 * @date		mm/dd/yyyy
 * @author		Brad Rippe (00000000) brippe@fullcoll.edu
 * @version		1.0
 */
#include <fstream>		//used for input files
#include <iostream>		//used for cin and cout
using namespace std;

/**
 * @return zero if the application executes successfully
 */
int main() {
	ifstream inFile;
	
	inFile.open("io.dat"); 	// change to file path
				// you can use full paths on windows
				// or linux like:
				// /home/brippe/l6Samples/io.dat
				// or on windows - d:\\projects\\csci123\\lecture6\\io.dat
	int tempInt;
	for (int i = 0; i < 15; i++) {
		// we can use the int variable because we know that all the 
		// data in the file is integer text. If we read in "brad" from
		// the file. We would receive a runtime error.
		inFile >> tempInt;
		cout << "Read " << tempInt << endl;
	}
	inFile.close();			// close your file to avoid corruption of data
	return 0;
}
